﻿using UnityEngine;
using System.Collections;

public class mapFly : MonoBehaviour
{
    public bool isFly { get; set; }// Whether user can fly
    // Use this for initialization
    void Start()
    {
        isFly = true;
    }

    // Update is called once per frame
    void Update()
    {
        isFly = true;
        foreach (GameObject obj in GameObject.FindGameObjectsWithTag("siteButton"))
        {
            if (obj.GetComponent<mapSiteButton>().gazeEnter) isFly = false;
        }
        GameObject.FindGameObjectWithTag("camera").GetComponent<mapScene>().isMove = isFly;
    }
}
